import instance from '@/utils/http'
// 新增收货地址
export const addAddress = (data) => instance.request({
  url: "/userAddress/save",
  method: 'post',
  data
})
// 获取收货地址列表
export const getAddressList = () => instance.request({
  url: '/userAddress/findUserAddress'
})

// 获取收货地址详情
export const getAddressDetail = (id) => instance.request({
  url: `/userAddress/${id}`
})
// 更新收货地址
export const updateAddress = (data) => instance.request({
  url: '/userAddress/update',
  method: 'post',
  data
})
// 删除收获地址
export const delAddress = (id) => instance.request({
  url: `/userAddress/delete/${id}`
})